home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume15 / stevie / patch1 < prev    next >
Encoding:
Internet Message Format  |  1988-06-06  |  5.8 KB

  1. Subject:  v15i042:  Missing header file for "stevie" editor, Patch1
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Tony Andrews <onecom!wldrdg!tony>
  7. Posting-number: Volume 15, Issue 42
  8. Archive-name: stevie/patch1
  9.  
  10. [  My mistake, sorry.  -r$  ]
  11.  
  12. #! /bin/sh
  13. # This is a shell archive.  Remove anything before this line, then unpack
  14. # it by saving it into a file and typing "sh file".  To overwrite existing
  15. # files, type "sh file -c".  You can also feed this as standard input via
  16. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  17. # will see the following message at the end:
  18. #        "End of shell archive."
  19. # Contents:  stevie.h
  20. # Wrapped by rsalz@fig.bbn.com on Tue Jun  7 14:12:01 1988
  21. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  22. if test -f 'stevie.h' -a "${1}" != "-c" ; then 
  23.   echo shar: Will not clobber existing file \"'stevie.h'\"
  24. else
  25. echo shar: Extracting \"'stevie.h'\" \(4557 characters\)
  26. sed "s/^X//" >'stevie.h' <<'END_OF_FILE'
  27. X/*
  28. X * STevie - ST editor for VI enthusiasts.    ...Tim Thompson...twitch!tjt...
  29. X *
  30. X * Extensive modifications by:  Tony Andrews       onecom!wldrdg!tony
  31. X *
  32. X */
  33. X
  34. X/*
  35. X * One (and only 1) of the following defines should be uncommented.
  36. X * Most of the code is pretty machine-independent. Machine dependent
  37. X * code goes in a file like tos.c or unix.c. The only other place
  38. X * where machine dependent code goes is term.h for escape sequences.
  39. X */
  40. X
  41. X#define    ATARI            /* For the Atari ST */
  42. X/* #define    UNIX            /* System V */
  43. X/* #define    OS2            /* Microsoft OS/2 */
  44. X
  45. X/*
  46. X * If ATARI is defined, one of the following compilers must be selected.
  47. X */
  48. X#ifdef    ATARI
  49. X#define    MEGAMAX            /* Megamax Compiler */
  50. X/* #define    ALCYON        /* Alcyon C compiler */
  51. X#endif
  52. X
  53. X/*
  54. X * If HELP is defined, the :help command shows a vi command summary.
  55. X */
  56. X#define    HELP            /* enable help command */
  57. X
  58. X#include <stdio.h>
  59. X#include <ctype.h>
  60. X#include <string.h>
  61. X#include "ascii.h"
  62. X#include "keymap.h"
  63. X#include "param.h"
  64. X#include "term.h"
  65. X
  66. Xextern    char    *strchr();
  67. X
  68. X#define NORMAL 0
  69. X#define CMDLINE 1
  70. X#define INSERT 2
  71. X#define APPEND 3
  72. X#define FORWARD 4
  73. X#define BACKWARD 5
  74. X
  75. X/*
  76. X * Boolean type definition and constants
  77. X */
  78. Xtypedef    short    bool_t;
  79. X
  80. X#ifndef    TRUE
  81. X#define    FALSE    (0)
  82. X#define    TRUE    (1)
  83. X#endif
  84. X
  85. X/*
  86. X * SLOP is the amount of extra space we get for text on a line during
  87. X * editing operations that need more space. This keeps us from calling
  88. X * malloc every time we get a character during insert mode. No extra
  89. X * space is allocated when the file is initially read.
  90. X */
  91. X#define    SLOP    10
  92. X
  93. X/*
  94. X * LINEINC is the gap we leave between the artificial line numbers. This
  95. X * helps to avoid renumbering all the lines every time a new line is
  96. X * inserted.
  97. X */
  98. X#define    LINEINC    10
  99. X
  100. X/*
  101. X * See 'normal.c' for a description of can_undo.
  102. X */
  103. Xextern    bool_t    can_undo;
  104. X
  105. X#define CHANGED Changed = !(can_undo = FALSE)
  106. X#define UNCHANGED Changed=0
  107. X
  108. Xstruct    line {
  109. X    struct    line    *prev, *next;    /* previous and next lines */
  110. X    char    *s;            /* text for this line */
  111. X    int    size;            /* actual size of space at 's' */
  112. X    unsigned int    num;        /* line "number" */
  113. X};
  114. X
  115. X#define    LINEOF(x)    (x->linep->num)
  116. X
  117. Xstruct    lptr {
  118. X    struct    line    *linep;        /* line we're referencing */
  119. X    int    index;            /* position within that line */
  120. X};
  121. X
  122. Xtypedef    struct line    LINE;
  123. Xtypedef    struct lptr    LPTR;
  124. X
  125. Xstruct charinfo {
  126. X    char ch_size;
  127. X    char *ch_str;
  128. X};
  129. X
  130. Xextern struct charinfo chars[];
  131. X
  132. Xextern int State;
  133. Xextern int Rows;
  134. Xextern int Columns;
  135. Xextern char *Realscreen;
  136. Xextern char *Nextscreen;
  137. Xextern char *Filename;
  138. Xextern LPTR *Filemem;
  139. Xextern LPTR *Fileend;
  140. Xextern LPTR *Topchar;
  141. Xextern LPTR *Botchar;
  142. Xextern LPTR *Curschar;
  143. Xextern LPTR *Insstart;
  144. Xextern int Cursrow, Curscol, Cursvcol, Curswant;
  145. Xextern bool_t set_want_col;
  146. Xextern int Prenum;
  147. Xextern bool_t Debug;
  148. Xextern bool_t Changed;
  149. Xextern bool_t Binary;
  150. Xextern char Redobuff[], Undobuff[], Insbuff[];
  151. Xextern LPTR *Uncurschar;
  152. Xextern char *Insptr;
  153. Xextern int Ninsert, Undelchars;
  154. X
  155. Xextern char *malloc(), *strcpy();
  156. X
  157. X/*
  158. X * alloc.c
  159. X */
  160. Xchar    *alloc(), *strsave();
  161. Xvoid    screenalloc(), filealloc(), freeall();
  162. XLINE    *newline();
  163. Xbool_t    bufempty(), buf1line(), lineempty(), endofline(), canincrease();
  164. X
  165. X/*
  166. X * cmdline.c
  167. X */
  168. Xvoid    readcmdline(), dotag(), msg(), emsg(), smsg(), gotocmd(), wait_return();
  169. X
  170. X/*
  171. X * edit.c
  172. X */
  173. Xvoid    edit(), insertchar(), getout(), scrollup(), scrolldown(), beginline();
  174. Xbool_t    oneright(), oneleft(), oneup(), onedown();
  175. X
  176. X/*
  177. X * fileio.c
  178. X */
  179. Xvoid    filemess(), renum();
  180. Xbool_t    readfile(), writeit();
  181. X
  182. X/*
  183. X * help.c
  184. X */
  185. Xbool_t    help();
  186. X
  187. X/*
  188. X * linefunc.c
  189. X */
  190. XLPTR    *nextline(), *prevline(), *coladvance();
  191. X
  192. X/*
  193. X * main.c
  194. X */
  195. Xvoid    stuffin(), stuffnum(), addtobuff();
  196. Xint    vgetc(), vpeekc();
  197. Xbool_t    anyinput();
  198. X
  199. X/*
  200. X * mark.c
  201. X */
  202. Xvoid    setpcmark(), clrall(), clrmark();
  203. Xbool_t    setmark();
  204. XLPTR    *getmark();
  205. X
  206. X/*
  207. X * misccmds.c
  208. X */
  209. Xvoid    opencmd(), fileinfo(), inschar(), insstr(), delline();
  210. Xbool_t    delchar();
  211. Xint    cntllines(), plines();
  212. XLPTR    *gotoline();
  213. X
  214. X/*
  215. X * normal.c
  216. X */
  217. Xvoid    normal(), resetundo();
  218. Xchar    *mkstr();
  219. X
  220. X/*
  221. X * param.c
  222. X */
  223. Xvoid    doset();
  224. X
  225. X/*
  226. X * ptrfunc.c
  227. X */
  228. Xint    inc(), dec();
  229. Xint    gchar();
  230. Xvoid    pchar(), pswap();
  231. Xbool_t    lt(), gt(), equal(), ltoreq(), gtoreq();
  232. X
  233. X/*
  234. X * screen.c
  235. X */
  236. Xvoid    updatescreen(), updateline();
  237. Xvoid    screenclear(), cursupdate();
  238. Xvoid    s_ins(), s_del();
  239. X
  240. X/*
  241. X * search.c
  242. X */
  243. Xvoid    dosearch(), repsearch();
  244. Xbool_t    searchc(), crepsearch(), findfunc();
  245. XLPTR    *showmatch();
  246. XLPTR    *fwd_word(), *bck_word(), *end_word();
  247. X
  248. X/*
  249. X * Machine-dependent routines.
  250. X */
  251. Xint    inchar();
  252. Xvoid    outchar(), outstr(), beep();
  253. X#ifndef    OS2
  254. Xvoid    remove(), rename();
  255. X#endif
  256. Xvoid    windinit(), windexit(), windgoto();
  257. Xvoid    delay();
  258. END_OF_FILE
  259. if test 4557 -ne `wc -c <'stevie.h'`; then
  260.     echo shar: \"'stevie.h'\" unpacked with wrong size!
  261. fi
  262. # end of 'stevie.h'
  263. fi
  264. echo shar: End of shell archive.
  265. exit 0
  266.